//
//  AppDelegate.m
//  linlee-iotios
//
//  Created by mengze on 2025/5/25.
//

#import "AppDelegate.h"
#import "MyTabBarController.h"

#import "LoginController.h"
#import "IndexController.h"
#import "PreLoadMachineController.h"
#import "WifiConnectionController.h"
#import "UIColor+Hex.h"



@interface AppDelegate ()


@end

@implementation AppDelegate


- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    // Override point for customization after application launch.
//    
    self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
//    NSLog(@"%@", self.window);
//    
//    NSString *kUserPhone = @"kUserPhone";
//    NSString *kUserToken = @"kUserToken";
////
//    NSString *phone = [[NSUserDefaults standardUserDefaults] stringForKey:kUserPhone];
//    NSString *token = [[NSUserDefaults standardUserDefaults] stringForKey:kUserToken];
//    
//[[WifiConnectionController alloc] init]; //=token? [[LoginController alloc] init] :
    UIViewController * vc = [[MyTabBarController alloc] init];
//    UINavigationController *  navigatorController = [[UINavigationController alloc] initWithRootViewController:vc];
//    navigatorController.navigationBar.backgroundColor = [UIColor colorWithHexString:@"#1E90EF"];
//    navigatorController.navigationBar.tintColor = [UIColor blackColor];
//    NSDictionary *dic = @{NSForegroundColorAttributeName : UIColor.blackColor ,
//                                 NSFontAttributeName : [UIFont systemFontOfSize:18]};
//    navigatorController.navigationBar.titleTextAttributes = dic;
//    navigatorController.navigationBar.barStyle = UIBarStyleBlack;
//    navigatorController.navigationBar.hidden = NO;
 
    self.window.rootViewController = vc;  //navigatorController;
    [self.window makeKeyWindow];
    
    
    return YES;
}


#pragma mark - UISceneSession lifecycle

//
//- (UISceneConfiguration *)application:(UIApplication *)application configurationForConnectingSceneSession:(UISceneSession *)connectingSceneSession options:(UISceneConnectionOptions *)options {
//    // Called when a new scene session is being created.
//    // Use this method to select a configuration to create the new scene with.
//    return [[UISceneConfiguration alloc] initWithName:@"Default Configuration" sessionRole:connectingSceneSession.role];
//}
//
//
//- (void)application:(UIApplication *)application didDiscardSceneSessions:(NSSet<UISceneSession *> *)sceneSessions {
//    // Called when the user discards a scene session.
//    // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
//    // Use this method to release any resources that were specific to the discarded scenes, as they will not return.
//}


@end
